#include<stdio.h>

/**
 * euler<<>> triangle generator
 */

/* 2010-04-21 */
void print_vector(int height, int weight);
void print_triangle(int height);

static unsigned long long  perm[105][105];
int main(void)
{
	int i, j;
	int N;
	int n, k;
	
	scanf("%d", &N);
	if(N > 100)
		N = 100;
	

	for(i=0; i<=105; i++) {
		perm[i][0] = 1;
		perm[i][i] = 0;
	}
	perm[0][0] = 1;

	for(n=1; n<=105; n++) {
		for(k=1; k<n; k++) {
			perm[n][k] = (k+1) * perm[n-1][k] + (2*n-1-k) * perm[n-1][k-1];
		}
	}

	print_triangle(N);
	return 0;
}

void print_vector(int height, int weight)
{
	int i, j;
	for(i=0; i<height; i++) {
		for(j=0; i<weight; j++) {
			printf("%llu ", perm[i][j]);
		}
		putchar('\n');
	}
}

void print_triangle(int height)
{
	int i, j;
	for(i=0; i<height; i++) {
		for(j=0; j<=i; j++) 
			printf("%llu ", perm[i][j]);	
		putchar('\n');
	}
}
